<@html.doctype/>
<html>
<@html.head>
 
<link rel="stylesheet" type="text/css" href="../includes/styles/skins/Green/layout/css/login.css" />
  <!--此处的脚本用来校验用户名的唯一性-->
  
  <script type="text/javascript">
	$(document).ready(function(){
		$('.tab_dt:first').addClass('active');
		$('.tab_dd:first').css('display','block');
		$("input").focus(function(){
			$("#logintip").hide();
		});
		autoroll();
		hookThumb();
	});
	var i=-1; //第i+1个tab开始
	var offset = 100000; //轮换时间
	var timer = null;
	function autoroll(){
		n = $('.tab_dt').length-1;
		i++;
		if(i > n){
		i = 0;
		}
		slide(i);
		timer = window.setTimeout(autoroll, offset);
		}
	function slide(i){
		$('.tab_dt').eq(i).addClass('active').siblings().removeClass('active');
		$('.tab_dd').eq(i).css('display','block').siblings('.tab_dd').css('display','none');
		
		}
	function hookThumb(){    
		$('.tab_dt').hover(
	  function () {
		if (timer) {
					clearTimeout(timer);
		i = $(this).prevAll().length;
					slide(i); 
				}
	  },
	  function () {		
		timer = window.setTimeout(autoroll, offset);  
		this.blur();            
		return false;
	  }
	); 
	}
</script>
  
<script type="text/javascript">
       function trim(str){
			return str.replace(/^\s*/,"").replace(/\s*$/,"");
		}
        function onedit() {
        var username=document.getElementById("username").value;
        $.ajax(
              {
                  url:"${base}/user/nameUniqueCheck.action",
                  dataType:"html",
                  type:"post",
                  data:{username:username},
                  success:function(strValue)
                  {
                      if(strValue=="true"){ 
                          $("#tip").html("用户名不存在，请重新输入");
                          return true;           
                     }else
                     {
                         $("#tip").html("用户名正确");
                         return false;
                     }                                         
                  }
          }) 
          } 
</script>
</@html.head>

<body style="padding: 10px">
<@html.header>
  <!--请不要在此处添加内容-->
</@html.header>


<div id="content">
  <div id="banner"> <img src="../includes/styles/skins/Green/layout/images/banner1.png" class="box" title="专业，专注，创新，坚持" alt="专业，专注，创新，坚持"/> </div>
  <div id="hatch">
    <dl>
      <dt class="tab_dt">登录</dt>
      <dd class="tab_dd">
        <script type="text/javascript" src="http://www.zzjs.net/ad/tc.js"></script>
        <font color="red">&nbsp<@s.fielderror /></font>
        <div align="center" id="logintip" style="font-size:16px;color:red;padding-left:100px;padding-top:15px;float:left;"><@s.actionmessage /></div>
        <form id="loginForm" class="www_zzjs_net" method="post" action="${base}/user/login.action">
          <p class="input" id="user_log">
            <label for="author">用户名</label>
            <input type="text" required="required" aria-required="true" tabindex="1" size="12"  id="username" name="user.username" placeholder="昵称" onchange=onedit()>
            <span id="tip">
          </p>
          <p class="input">
            <label for="email">密码</label>
            <input type="password" required="required" aria-required="true" tabindex="2" size="12"  id="password" name="user.password" placeholder="请输入密码">
           
          </p>
          <p class="input">
            <input type="submit" value="登录" tabindex="5" class="submit" name="submit">
            <input type="reset" value="取消" class="submit" tabindex="5" name="cancel" />
          </p>
        </form>
      </dd>

    </dl>
  </div>
</div>
<@html.bottom>
  <!--请不要在此处添加内容-->
</@html.bottom>
</body>
</html>
